<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//include('utils.php');
$sql="select * from ".SITEMASTER." where adsiteId='".$_REQUEST['sid']."'";
$rec=mysql_fetch_array(mysql_query($sql));
?>
<form name="web_add" method="POST" action="">
<input type="hidden" name="mode" value="saveInfoWeb">
<table class="center" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="154" valign="top">&nbsp;</td>
    <td valign="top">
        <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="30" colspan="5" align="center" style="padding-top:20px;"><font color="red">
                <?php echo $GLOBALS['msg'];?></font>
            </td>
        </tr>
        <tr>
            <td width="100" height="50" colspan="5" align="center" valign="middle" class="font-12 black advertise_tableTxt">
                <?php echo REGISTER_DESC;?>
            </td>
        </tr>
        <tr>
            <td width="100" height="30">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="3"><img src="images/FormNameBoxLeft.jpg" alt="" width="3" height="18"></td>
                    <td class="FormNameBoxBg"><?php echo SITENAME;?>:</td>
                    <td width="13"><img src="images/FormNameBoxRight.jpg" alt="" width="13" height="18"></td>
                </tr>
                </table>
            </td>
            <td width="14">&nbsp;</td>
            <td><input name="site_name" type="text" class="InputBox" id="siteName" value="<?php echo $rec['adSiteName'];?>"></td>
            <td width="11">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td height="30">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="3"><img src="images/FormNameBoxLeft.jpg" alt="" width="3" height="18"></td>
                    <td class="FormNameBoxBg">Site URL:</td>
                    <td width="13"><img src="images/FormNameBoxRight.jpg" alt="" width="13" height="18"></td>
                </tr>
                </table>
            </td>
            <td>&nbsp;</td>
            <td>
                <table>
                <tr>
                <td colspan="2" class="font-12 black advertise_tableTxt">
                    <input name="destinationUrl" id="destinationUrl" value="<?php echo $rec['adSiteUrl'];?>" type="text" class="InputBox">
                </td>
                </tr>
                </table>
            </td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td height="30">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="3"><img src="images/FormNameBoxLeft.jpg" alt="" width="3" height="18"></td>
                    <td class="FormNameBoxBg">Category:</td>
                    <td width="13"><img src="images/FormNameBoxRight.jpg" alt="" width="13" height="18"></td>
                </tr>
                </table>
            </td>
            <td>&nbsp;</td>
            <td>
                <select id="adcategory" name="adcategory" class="InputBox">
                <option value="">--select--</option>
                <?
                    $query_category=mysql_query("select * from ".CATEGORIES." where langId='1'");
                    while($res_cat= mysql_fetch_array($query_category)){
                ?>
                    <option value="<? echo $res_cat['adcategoryId']?>" <?php if($res_cat['adcategoryId']==$rec['adcategoryId']) echo "selected";?>> <?php echo stripslashes($res_cat['categoryName']);?></option>
                <?
                    }
                ?>
                </select>
            </td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td height="30">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="3"><img src="images/FormNameBoxLeft.jpg" alt="" width="3" height="18"></td>
                    <td class="FormNameBoxBg" nowrap="true">Site Description:</td>
                    <td width="13"><img src="images/FormNameBoxRight.jpg" alt="" width="13" height="18"></td>
                </tr>
                </table>
            </td>
            <td>&nbsp;</td>
            <td valign="middle">
                <textarea id="description" name="description" cols="42" rows="5" class="InputtextArea" onkeyup="javascript:changeValue(this.value, 255, 'descriptionCount');"><?php echo $rec['siteDescription'];?></textarea>
                &nbsp;<font class="BlackContent">(Characters left:</font><span id="descriptionCount" class="BlackContent">255</span><font class="BlackContent"> )</font>
            </td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
        <td colspan="5" style="text-align: center; padding-top: 10px;">
            <input name="button3" type="submit" class="SubmitInputButton" id="button3" value="Save" style="width: 60px;">
        </td>
        </tr>
        </table>
    </td>
    </tr>
    </table>
</td></tr>
</table>
</td>
</tr>
</table>
</form>